Repository navigation
fix: preserve tray caption fonts during repeated style assignments - #239
Conversation
The change adds a Windows-only xUnit project for the actual `ModernButtonUserControl`. The project targets .NET 8, enables Windows Forms, restricts builds to x64, and references the tray project. The regression theory covers English and Russian captions across equal, repeated, and changed `Bold` assignments. The test creates the control on an STA thread without a visible window or tray entry point. The assertions verify the public state, label text, requested font style, and completion within 15 seconds. The drawing check exercises the selected native-backed font through `GetHeight` and `DrawString`. The bitmap scan confirms that rendering changes pixels from the black background. The diagnostic output records framework, Windows Forms, drawing, and tray assembly identities. The assembly setting disables parallel test execution. The implementation plan records the reproduction, correction, verification, native acceptance, and integration stages. The document keeps execution and acceptance checks pending, and identifies the font disposal mechanism as an unconfirmed hypothesis. Changed files: - "CDPIUI.TrayIcon.Tests/CDPIUI.TrayIcon.Tests.csproj" (+20/-0 lines). - "CDPIUI.TrayIcon.Tests/ModernButtonFontLifetimeTests.cs" (+95/-0 lines). - "docs/superpowers/plans/2026-11-13-tray-font-lifetime.md" (+60/-0 lines). The file counts compare the staged tree with its first parent. Staged-Tree: 859b3fa
The `Bold` setter now compares the selected font style with the requested style before replacing the font. The equal-style path retains the existing `Font` instance and avoids disposing the instance preserved by the Windows Forms setter. Genuine style changes continue to create a replacement font and dispose the previous font. The Windows CI job now runs the tray font regression project after the existing managed suite. The script stops immediately when the managed suite fails. The package audit now includes the tray test project with the x64 platform setting. The English and Russian contributor guides document the Windows-only tray font test command. The governance inventory records the font-lifetime plan and its provenance. The plan marks completed regression, correction, and local verification tasks. The document records eight real-control RED failures, two positive controls, and subsequent local GREEN results. The document also preserves runtime identities, artifact hashes, and explicit acceptance boundaries. Final committed-HEAD, native tray, RESW16, installer provenance, and integration checks remain pending. Changed files: - ".github/CONTRIBUTING.md" (+1/-0 lines). - ".github/CONTRIBUTING.ru.md" (+1/-0 lines). - ".github/workflows/ci.yml" (+6/-2 lines). - "CDPIUI.TrayIcon/Controls/ModernButtonUserControl.cs" (+5/-1 lines). - "docs/governance/document-inventory.json" (+10/-0 lines). - "docs/superpowers/plans/2026-11-13-tray-font-lifetime.md" (+30/-10 lines). The file counts compare the staged tree with its first parent. Staged-Tree: a7da6a6
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Final integration and closeout are accepted. This PR's normal merge5c280 preserves exact testedcd5 tree and its code is in main Fresh Project279 table+board readback confirms both this PR item304223837 and issue238 item304164716 are Done/P1/UX/Low with the original labels, owner and G4. Qualified release280 is |
Problem
The tray menu assigns
Bold = falseto a caption whose designer font is already regular. The old setter creates an equal Font, assigns it and disposes the previous instance. WinForms can retain the previous instance when the values are equal, so the selected caption font becomes unusable. Installed RESW reservation265 exposed an unreadable Exit label and stopped before case2.Changes
This is a narrow stacked PR into
dev/resw-localization/ PR #237. The original presentation, localization and JSON beta evidence remains preserved.Verification
Final source HEAD:
cd5bcfd9a059f287b9cc851fb5a33845280c3cbe.The local GREEN run used base
541d32fd135f72861ad2ded001a5e50bf48d07f2and exact frozen patch69a6415241ff4a7bea8cbf344d24d511d868b10e54275920466a9f1a238bef53before committing corrective product code. All tested source, test and CI files match this final HEAD; only the plan's evidence prose/check boxes changed after execution.Actual loaded framework: .NET8.0.33, Windows Forms and System.Drawing.Common file8.0.3326.52211 from the task-local WindowsDesktop runtime. The NuGetDrawing8.0.31 preparation pin was not the actual Font assembly selected by the test host; its role is recorded separately.
RED TRX SHA256:
9fd9ccbd5a9f96fd764b56b428bbdfc5433f64dfd041d98b1fc99a243227cb42. GREEN TRX:b0c698c4f7000dded1a468eb70b170eb8cd2ea03f33b5809ba7b5a48ef96e1e6. Candidate managed TRX:bd84fdb856fc6bb2ac4db51b973338d7b69a499457360992785f6b4cd0300d55.Both serial reservations269/271 were qualified and released as270/272 after fresh absence checks. Original results, process identities and used compiled files are retained. The plan and evidence record gives exact limits.
Independent whole-change source and retained-evidence review passed on this final HEAD with no Critical, Important or Minor findings. Reviewer
/root/tray_font_final_reviewindependently verified all 108 RED and 54 GREEN retained files, parsed the TRX results and verified the 1,614-input bridge (only later plan prose differs). Receipt SHA256:f2fe362eaa591a321f5044ed77f7edaf938648c86c416d66058a8b1a67da4220. Final committed-HEAD CI is complete: all nine latest check names and Contribution metadata succeeded. PUSH CI43476971367 and PR CI43477146319 both passed; the hosted library log records2600+10 passed, zero failures or skips. File scanning and the PR two-new-commit history scan are clean; the new-branch PUSH history scan was skipped, which is explicitly excluded from history proof. The exact selected CI MSI completed native reservation275: all16 original installed RESW scenarios passed independent retained review. Readable EN/RU Tray captions and normal Quit are verified. Main integration remains a separate gate.Risk and recovery
Low risk for a private caption-font lifetime correction. Repeated assignments must keep a usable font while genuine style changes retain their appearance and command behavior. The regression cases exercise actual font use rather than only cached Style/Equals values.
Recover additively in the owned branch using the recorded previous source and retained binaries. Preserve all stopped native265 evidence and frozen original refs. The private bitmap result does not prove the exact caught paint exception in265 or its historical runtime baseline.
Related work
Refs #238. Parent stable RESW work: #236 / PR #237. Subsequent presentation integration: #234. Broader installed GUI/tray scope: #16. Main-stage acceptance and broader active-branch adoption remain separate.
Maintainer checks
type:label and at least onearea:label.All PR-local checks are verified. Issue #238 remains open for normal integration, final main tree/post-checks and its six-section acceptance record. No main integration or issue closure is claimed here.
The distinct evidence/bridge/CI/package review also passed (receiptsC65941F9 and8074760C). Selected PUSH artifact14062464409: ZIP SHA256
122411CAA6168D7457BF03E24F8CA12C49535332332B449CDABD70075C9BB47F, contained MSI SHA256E5B9E8BD463B4DCE97B59D7040676CE846A9FB4C43E8DEB09A5D98C145578BB6. This exact MSI was installed only in a fresh offline Sandbox under275. Whole retained review accepted16/16 after qualified release276. Old265 remains stopped and preserved.Installed native acceptance
Reservation275 used source
cd5bcfd9a059f287b9cc851fb5a33845280c3cbe, WindowsDesktop8.0.33 and the pinned MSI above. All16 original ordered scenarios executed once, with68 unique bound commands and no replay. EN/RU Tray Exit captions and relevant regular/bold captions are readable; actual semantic Quit and bound process inspections return zero. Four before/after pairs preserve sampled PID/creation time/path/parent. This establishes sampled continuity, not continuous ancestry or live Tray language refresh.The independent reviewer inspected all61 unique permitted original frame contents and rehashed the355-file/4-external-receipt retained manifest
520B5EF7B6DE2D505CFB22C7E760FFED885A231069C052FF6DB79E7AF435B20E. Whole16 acceptance receipt:EAC00D398998A3BEA99E1081B87FABBF85A95408D4B9CE08FE45D802D8D0DE04; separate data validation:5870C2D0B3DA950D3E6A1A23729360F71A86E96DA6922999DDC311086C3C45E7. This is retrospective independent agent evidence review, without an invented human approval or click witness.Initial/final322 payload files and14 guest inputs match. Host833 files,16 registry roots, primary index and protected foreign VM identity are preserved. Normal Sandbox disposal and monitor
normally-finishedplus fresh owned identity/descendant absence qualified release2761427E60AE6DAEAA8F97D621F52F75298A8F5AEE0B9CEAD0044609AC4D231726E. The monitor raw OS exit code was not measured. The frozen active resource receipt is validated against its immutable archived version and subsequent release transition.Cases8/12/13 use unchanged Windows ru-RU fallback when the preference cannot be read; English emergency UI in that combined-failure state is not claimed. No criterion or sealed input changed, no formal STOP was waived, and no case replay occurred. Native265, earlier failed attempts and historical black-screen evidence remain preserved; the old black-screen cause remains unknown. Broader G3/G4/G5, main integration, active-branch adoption and #234 are separate gates.
The RESW execution owner freshly confirmed clean local/remote base
ffae24346fa80ed5a6fc4a5e2ae1de9c000aee21and the safe normal-merge boundary (ACKEFB7F06F9E118A96930333F0F0C8CC49010D93EECF761A161E875E47E3A67B28). Keep both owned worktrees, all frozen refs and foreign WIP.